@model OpenPac.Models.MediaOutletIssue

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Importance)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Importance)
    @Html.ValidationMessageFor(model => model.Importance)
</div>

<div class="editor-label">
    MediaOutlet
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.MediaOutletId, ((IEnumerable<OpenPac.Models.MediaOutlet>)ViewBag.PossibleMediaOutlets).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.MediaOutletId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.MediaOutletId)
</div>
<div class="editor-label">
    Issue
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.IssueId, ((IEnumerable<OpenPac.Models.Issue>)ViewBag.PossibleIssues).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.IssueId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.IssueId)
</div>
